package StudyCode.summary.regularexpressionsmatch;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingSmallD {
	public static void main(String[] args) {
		Pattern pattern = Pattern.compile("\\d\\d\\d-\\d\\d-\\d\\d\\d\\d");
		Matcher matcher = pattern.matcher("779-12-1212");
		System.out.println("\\d匹配结果:");
		if (matcher.matches())
			System.out.println("匹配到.");
		else
			System.out.println("未匹配到.");
	}
}
